package com.wzy.vx.Utils;

/**
 * @ProjectName: vx
 * @Package: com.wzy.vx.Utils
 * @ClassName: JudgeUtil
 * @Author: Administrator
 * @Description: ${description}
 * @Date: 2019/3/25 9:41
 * @Version: 1.0
 */
public class JudgeUtil {
    /**
     * 判断是否相等 用来处理精度丢失w问题 可以优化
     * */
    private static final Double MONEY_RANGE = 0.01;

    public static Boolean equals(Double d1, Double d2) {
        Double result = Math.abs(d1 - d2);
        if (result < MONEY_RANGE) {
            return true;
        }else {
            return false;
        }
    }



}
